package common;

import io.netty.channel.Channel;

public class BrokerLiveInfo {
	private long lastUpdateTimestamp;
	private int dataVersion;
	private Channel channel;
	private String haServerAddr;

	public BrokerLiveInfo(long lastUpdateTimestamp, int dataVersion, Channel channel, String haServerAddr) {
		this.lastUpdateTimestamp = lastUpdateTimestamp;
		this.dataVersion = dataVersion;
		this.channel = channel;
		this.haServerAddr = haServerAddr;
	}

	public long getLastUpdateTimestamp() {
		return lastUpdateTimestamp;
	}

	public void setLastUpdateTimestamp(long lastUpdateTimestamp) {
		this.lastUpdateTimestamp = lastUpdateTimestamp;
	}

	public int getDataVersion() {
		return dataVersion;
	}

	public void setDataVersion(int dataVersion) {
		this.dataVersion = dataVersion;
	}

	public Channel getChannel() {
		return channel;
	}

	public void setChannel(Channel channel) {
		this.channel = channel;
	}

	public String getHaServerAddr() {
		return haServerAddr;
	}

	public void setHaServerAddr(String haServerAddr) {
		this.haServerAddr = haServerAddr;
	}

	@Override
	public String toString() {
		return "BrokerLiveInfo [lastUpdateTimestamp=" + lastUpdateTimestamp + ", dataVersion=" + dataVersion
				+ ", channel=" + channel + ", haServerAddr=" + haServerAddr + "]";
	}
}
